const children = require.context('./components', false, /^\.\/com\-(\w+)\.js$/)
const componentsList = {}
if (children) {
  children.keys().forEach(key => {
    console.log('key', key)
    let obj = children(key)
    const fixKey = key.replace(/\.\//, '').replace(/\.js/, '')
    console.log('fixKey', fixKey)
    componentsList[fixKey] = obj.default
  })
}



// const v1 = require('./components/com-v1.js/index.js')
// import {value} from './components/com-v1'


// console.log('v1.value', value)